<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>老张博客前台模版</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<title>文章管理</title>
	<link rel="stylesheet" href="/plugins/layui/css/layui.css"  media="all" />
	<link rel="stylesheet" type="text/css" href="/css/style.css" />
	<!--[if lt IE 9]>
	<script type="text/javascript" src="/plugins/html5shiv.js"></script>
	<script type="text/javascript" src="/plugins/respond.min.js"></script>
	<![endif]-->
	<!--[if IE 6]>
	<script type="text/javascript" src="/plugins/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script>
	<![endif]-->
</head> 
<body>
<div th:include="front/incs/head::#head"></div>
<!-- 文章 开始 -->
<div class="main index_main">
	<div class="page_left">	
	<form name="indexList"  id="indexList" method="post" > 
	<ul class="page_left_list"> 
		<li  th:each="row, iterStat :${text_datas}"  th:class="${row.thumbnail}==null?'no_pic':''">
			<a th:href="'view/'+${row.uid}"  th:class="${row.thumbnail}==null?'':'pic'">
			<img th:if="${row.thumbnail!=null}" th:src="${row.thumbnail}"  th:alt="${row.title}"  style="width:165px;height:110px;"/></a>
			<h2 class="title"><a th:href="'view/'+${row.uid}"  th:text ="${row.title}"></a></h2>
			<div class="date_hits">
				<span th:text="${row.updateuser.name}" />
				<span th:text="${row.relativedate}"  />
				<a th:href="'list/'+${row.classification.uid}"  ><span th:text="${row.classification.name}" /></a>
				<i class="layui-icon" title="点击量"><span class="hits" th:text="${row.clicknum}+'℃'" /></i> 
				<p class="commonts"><i class="layui-icon" title="点击量">&#xe63a;</i> <span id="" class="cy_cmt_count" th:text="${row.clicknum}" /></p>
			</div>
			<div class="desc" th:text="${row.introduction}" />
		</li>
	</ul>
	<input type="hidden" id="pageNo" name="pageNo" th:value="${pageNo }"></input>
	<input type="hidden" id="pageSize" name="pageSize" th:value="${pageSize }"></input>
	<input type="hidden" id="itemsCount" name="itemsCount" th:value="${itemsCount }"></input>
	<div style="text-align:right;" id="pager"></div>
	</form>
	</div>
	
	<div class="page_right">
		<div class="about_stationmaster_container">
			<h3>博主信息</h3>
			<ol class="page_right_list trans_3">
				<li>姓名：张丹峰</li>
				<li>职业：PHP程序猿、WEB前端</li>
				<li>座右铭：业精于请、学无止境、工匠精神</li>
				<li>QQ群：602099721 </li>
			</ol>
		</div>
		<div class="new_list">
			<h3>最新文章</h3>
			<ol class="page_right_list trans_3">
				<li><a href="http://www.phplaozhang.com">老张博客上线啦(二)</a><span class="hits"> 888 ℃ </span></li>
				<li><a href="http://www.phplaozhang.com">老张博客上线啦(二)</a><span class="hits"> 5 ℃ </span></li>
				<li><a href="http://www.phplaozhang.com">老张博客上线啦(二)</a><span class="hits"> 320 ℃ </span></li>
				<li><a href="http://www.phplaozhang.com">老张博客上线啦(二)</a><span class="hits"> 135 ℃ </span></li>
			</ol>
		</div>
		<h3>友情连接</h3>
		<div class="links trans_3">
			<a href="http://www.phplaozhang.com" target="_blank">老张博客</a>
		</div>
	</div>
	<div class="clear"></div>
</div>
<!-- 文章 结束 -->
<div th:include="front/incs/bottom::#bottom"></div>
<script type="text/javascript" charset="utf-8"  src="/plugins/layui/layui.js"  />
<script type="text/javascript">
var pageNo = parseInt(document.getElementById("pageNo").value);
var pageSize = document.getElementById("pageSize").value;
var itemsCount = document.getElementById("itemsCount").value;

layui.use(['form','element'], function(){
	var layer = layui.layer,
	form = layui.form(),
	element = layui.element(),
	$ = layui.jquery;
  	
	//左边导航点击显示
	$('.left_nav_btn').click(function(){
		$('.left_nav_mask').show();
		$('.left_nav').addClass('left_nav_show');
	});
	//左边导航点击消失
	$('.left_nav_mask').click(function(){
		$('.left_nav').removeClass('left_nav_show');
		$('.left_nav_mask').hide();
	});

	//搜索框特效
	$('.header .head_search .search_input').focus(function(){
		$('.header .head_search').addClass('focus');
		$(this).attr('placeholder','输入关键词搜索');
	});
	$(document).click(function(){
		$('.header .head_search').removeClass('focus');
		$('.header .head_search .search_input').attr('placeholder','搜索');
	});
	$('.header .head_search').click(function(e){
		$(this).addClass('focus');
		e.stopPropagation(); 
	});
	/*$('.header .head_search .close').click(function(){
		$('.header .head_search').removeClass('focus');
		$('.header .head_search .search_input').attr('placeholder','搜索');
	});*/
});

layui.use(['laypage', 'layer'], function(){
	  var laypage = layui.laypage
	  ,layer = layui.layer;

	  laypage({
		    cont: 'pager'
		    ,skin: '#1E9FFF'
			,pages: Math.ceil(itemsCount/pageSize) //得到总页数
			,curr: pageNo
			,groups: 0 //连续显示分页数
			,first: false
		    ,last: false
		    ,jump: function(obj,first){
		    	 if(first!=true){//是否首次进入页面  
		    		goPage(obj.curr)
		    		layer.msg('第 '+ obj.curr +' 页');
		    	 }
		    }
		  }); 
}); 
function goPage(pageNo){
	document.getElementById("pageNo").value = pageNo;
	search();
}

function search(){
	document.getElementById("indexList").target = "_self";
	document.getElementById("indexList").action = "/page";
	document.getElementById("indexList").submit();
}
</script>
</body>
</html>